package com.jeasonzhao.report.exceptions;

import com.jeasonzhao.report.msg.Message;

public class ReportLoaderException extends SQLReportException
{
    private static final long serialVersionUID = 1L;

    public ReportLoaderException(Object ...objs)
    {
        super(objs);
    }

    public ReportLoaderException(Throwable t,Object ...objs)
    {
        super(t,objs);
    }
    @Message(
       {"zh_cn","资源加载类{0}加载出现错误：找不到相应的资源\"{1}\""
       ,"en","Report loader {0} could not found the resource named \"{1}\"."})
   public static class ResourceHasnotBeenFound extends ReportLoaderException
   {
       private static final long serialVersionUID = 1L;

       public ResourceHasnotBeenFound(Class<?> cls,String resourceName)
       {
           super(null==cls?"<UNKNOWN>":cls.getName(),resourceName);
       }
   }
   @Message(
       {"zh_cn","资源加载类{0}配置错误：找不到相应的资源{1}的配置"
       ,"en","Report loader {0} configuration error: could not found the value of \"{1}\"."})
   public static class ResourceHasnotBeenConfigured extends ReportLoaderException
   {
       private static final long serialVersionUID = 1L;

       public ResourceHasnotBeenConfigured(Class<?> cls,String resourceName)
       {
           super(null==cls?"<UNKNOWN>":cls.getName(),resourceName);
       }
   }

}
